$OpenBSD: patch-lib_silccore_silcpacket_c,v 1.1 2010/07/31 12:43:25 sthen Exp $
--- lib/silccore/silcpacket.c.orig	Sat May 29 18:59:19 2010
+++ lib/silccore/silcpacket.c	Sat May 29 19:00:31 2010
@@ -2231,8 +2231,9 @@ static void silc_packet_read_process(SilcPacketStream 
 
     /* Padding sanity checks */
     if (cipher && silc_cipher_get_mode(cipher) != SILC_CIPHER_MODE_CTR &&
-	((normal && paddedlen % block_len != 0) ||
-	 (!normal && silc_packet_special_len(header) % block_len != 0))) {
+	((normal && block_len && paddedlen % block_len != 0) ||
+	 (!normal && block_len &&
+          silc_packet_special_len(header) % block_len != 0))) {
       SILC_LOG_DEBUG(("Packet length %d not multiple by cipher block length",
 		      paddedlen));
       silc_mutex_unlock(stream->lock);
